package bat.iog.hytool.tomcat.core;

public interface Lifecycle {


    // ----------------------------------------------------- Manifest Constants

    public static final String BEFORE_INIT_EVENT = "before_init";


    public static final String AFTER_INIT_EVENT = "after_init";


    public static final String START_EVENT = "start";


    public static final String BEFORE_START_EVENT = "before_start";


    public static final String AFTER_START_EVENT = "after_start";


    public static final String STOP_EVENT = "stop";


    public static final String BEFORE_STOP_EVENT = "before_stop";


    public static final String AFTER_STOP_EVENT = "after_stop";


    public static final String AFTER_DESTROY_EVENT = "after_destroy";


    public static final String BEFORE_DESTROY_EVENT = "before_destroy";


    public static final String PERIODIC_EVENT = "periodic";


    public static final String CONFIGURE_START_EVENT = "configure_start";


    public static final String CONFIGURE_STOP_EVENT = "configure_stop";


    // --------------------------------------------------------- Public Methods


    public void addLifecycleListener(LifecycleListener listener);


    public LifecycleListener[] findLifecycleListeners();


    public void removeLifecycleListener(LifecycleListener listener);


    public void init() throws LifecycleException;


    public void start() throws LifecycleException;


    public void stop() throws LifecycleException;


    public void destroy() throws LifecycleException;



    public LifecycleState getState();


    public String getStateName();


    public interface SingleUse {
    }
}

